home *** CD-ROM | disk | FTP | other *** search
-
- <script language="JavaScript">
-
- function ShowInvoice()
- {
- totprice = 0;
- itemlist = 0;
- TotQty = 0;
- TotWeight = 0;
- FinalTotWeight = 0;
-
-
- document.writeln('<table border=2 cellspacing=5 cellpadding=5>');
- ###TITLE_ROW###
-
- for(NumItems = 0; NumItems<MaxCartItems; NumItems++)
- {
- CookieName = "Cart" +NumItems;
- CookieValue = GetCookie(CookieName);
-
- if(CookieValue != null)
- {
- for(var i = 0;i <= CookieValue.length; i++)
- {
- // using 0192,0193,0194,0195,0196
- if (CookieValue.substring(i,i+1) == '[')
- {
- itemstart = i+1;
- }
- else if (CookieValue.substring(i,i+1) == '└')
- {
- ID = CookieValue.substring(itemstart, i);
- itemstart = i+1;
- }
- else if (CookieValue.substring(i,i+1) == '┴')
- {
- Sdesc = CookieValue.substring(itemstart, i);
- itemstart = i+1;
- }
- else if (CookieValue.substring(i,i+1) == '┬')
- {
- Price = CookieValue.substring(itemstart, i);
- itemstart = i+1;
- }
- else if (CookieValue.substring(i,i+1) == '├')
- {
- Qty = CookieValue.substring(itemstart, i);
- itemstart=i+1;
- }
- else if (CookieValue.substring(i,i+1) == '─')
- {
- Weight = CookieValue.substring(itemstart, i);
- itemstart = i+1;
- }
- else if (CookieValue.substring(i,i+1) == ']')
- {
- WeightUnit = CookieValue.substring(itemstart, i);
- itemstart = i+1;
-
- TotQty = TotQty + parseInt(Qty);
- TotWeight = Weight * Qty;
-
- ItemTotal = 0;
- ItemTotal = (eval(Price*Qty));
- temptotal = ItemTotal * 100;
- totprice = totprice + ItemTotal;
-
- FItemTotal = FloatFormat(ItemTotal,2);
- FTotWeight = FloatFormat(TotWeight,2);
-
- ###CONVERT_UNIT###
- ###SHOW_ITEM###
- }
- }
- }
- }
-
- Ftotprice = FloatFormat(totprice,2);
- ###SUB_TOTAL_ROW###
-
- ###TAX###
- FTax = FloatFormat(Tax,2);
- FCTax = FloatFormat(CTax,2);
- ###SHIPPING###
- FShipping = FloatFormat(Shipping,2);
- FOCShipping = FloatFormat(OCShipping,2);
- ###SHIPPING_ROW###
-
- NatFGrandTotal = FloatFormat(totprice + CTax + Shipping,2);
- ONatFGrandTotal = FloatFormat(totprice + Shipping + OCShipping,2);
- FGrandTotal = FloatFormat(totprice + Tax + CTax + Shipping,2);
- ###TAX_ROW###
- ###NAT_TOTAL_ROW###
- ###TOTAL_ROW###
- ###OUT_COUNTRY_ROW###
- document.writeln('</table>');
- }
-
- </script>
-